﻿function fibonacci(n) {
    var process = new Array();
    return function () {
        if (!typeof process[n] == "number") {
            process[n] = n < 3 ? 1 : typeof process[n - 1]== "number" ? process[n - 1] : fibonacci(n - 1) + typeof process[n - 2]== "number" ? process[n - 2] : fibonacci(n - 2);
        }
        return process[n];
    }
}


